﻿namespace ALiOss;

public interface IOss
{
    Task<bool> IsExistedAsync(string filename);
    Task SaveAsync(string filename, byte[] bytes) => SaveAsync(filename, new MemoryStream(bytes));
    Task SaveAsync(string filename, Stream stream);
    Task SavePublicReadAsync(string filename, byte[] bytes) => SavePublicReadAsync(filename, new MemoryStream(bytes));
    Task SavePublicReadAsync(string filename, Stream stream);
    /// <summary>
    /// 
    /// </summary>
    /// <param name="prefix">前缀</param>
    /// <param name="delimiter"></param>
    /// <returns></returns>
    Task<FileMetas?> GetMetasAsync(string prefix = "", string delimiter = "");
    Task<byte[]> GetAsync(string filename);
    Task DeleteAsync(string filename);
}
